package guoanmaker.operator.business.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import guoanmaker.operator.business.model.Patent;

public interface PatentRepository extends JpaRepository<Patent, String>,JpaSpecificationExecutor<Patent> {
	
	@Modifying
	@Transactional
	@Query(value = "delete from Patent where userId =:userId")
	public int deletePatentByUserid(@Param("userId")String userId);
	
}
